aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/projets/[slug].tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-09-29 11:47:06 +0200
committerArmand Philippot <git@armandphilippot.com>2023-10-24 12:25:00 +0200
commit81b1e0e05919eb368a66aef47adcf7738af76f29 (patch)
tree758577d3f58d7025f84bca5bac9bc0da8432deb7 /src/pages/projets/[slug].tsx
parent3272ac336da52364ace5ed76d8f609d4088ffc06 (diff)
refactor(components): rewrite Spinner component
* Message should be set as children * Default message is no longer available (depending on use case, the consumer might prefer aria-label instead) * It is now possible to define the message position
Diffstat (limited to 'src/pages/projets/[slug].tsx')
-rw-r--r--src/pages/projets/[slug].tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pages/projets/[slug].tsx b/src/pages/projets/[slug].tsx
index afcf060..717ae13 100644
--- a/src/pages/projets/[slug].tsx
+++ b/src/pages/projets/[slug].tsx
@@ -170,6 +170,12 @@ const ProjectPage: NextPageWithLayout<ProjectPageProps> = ({ project }) => {
return links;
};
+ const loadingRepoPopularity = intl.formatMessage({
+ defaultMessage: 'Loading the repository popularity...',
+ description: 'ProjectsPage: loading repository popularity',
+ id: 'RwI3B9',
+ });
+
const { isError, isLoading, data } = useGithubApi(
/*
* Repo should be defined for each project so for now it is safe for my
@@ -182,7 +188,7 @@ const ProjectPage: NextPageWithLayout<ProjectPageProps> = ({ project }) => {
);
if (isError) return 'Error';
- if (isLoading || !data) return <Spinner />;
+ if (isLoading || !data) return <Spinner aria-label={loadingRepoPopularity} />;
const getRepoPopularity = (repo: string) => {
const stars = intl.formatMessage(